package com.rc.saas.tenant.service.acct;

import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.common.vo.TResponse;
import com.rc.saas.tenant.mapper.acct.AcctRuleMapper;
import com.rc.saas.tenant.model.acct.AcctRule;
import com.rc.saas.tenant.model.acct.AcctRuleExample;
import com.rc.saas.tenant.search.acct.AcctRuleSearch;
import com.rc.saas.tenant.vo.acct.AcctRuleResultVo;
import com.rc.saas.tenant.vo.acct.AcctRuleSaveVo;

import java.io.IOException;
import java.text.ParseException;
import java.util.Date;

/**
 * @author frog
 * @date 2021/1/19
 */
public interface AcctRuleService extends BaseService<Long, AcctRule, AcctRuleExample, AcctRuleMapper> {
    TResponse saveAcctRule(AcctRuleSaveVo acctRuleSaveVo) throws ParseException;

    void updateAcctRule(AcctRuleSaveVo acctRuleSaveVo);

    PageInfo<AcctRuleResultVo> listPageAcctRule(AcctRuleSearch acctRuleSearch);

    Boolean isExecuteAcctRule(AcctRuleSearch acctRuleSearch);

    AcctRuleResultVo selectAcctRule(Long acctRuleId);

    Boolean isProcessingAcctRule(Long acctRuleId,Long operatorStationId, Date ruleStartTime, Date ruleEndTime);

    int countByAcctRuleStation(String tenantCode);
}
